package demo1;

public class Main {
    public static void main(String[] args) {
        Computer computer = new Computer();
        Mouse mouse = new Mouse();
        KeyBoard keyBoard = new KeyBoard();
        computer.powerOn();
        //使用鼠标设备
        computer.useService(mouse);
        //使用键盘设备
        computer.useService(keyBoard);
        computer.powerOff();
    }
}
